import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'

Vue.use(VueRouter)

/* Layout */
import Layout from '@/layout/index.vue'

const routes: Array<any> = [
  {
    path: '/login',
    name: "GlobalLogin",
    component: () => import('@/views/login/index.vue'),
    hidden: true
  },
  {
    path: '/model-map',
    name: "GlobalModelMap",
    component: () => import('@/views/modelMap/index.vue'),
    hidden: true
  },
  {
    path: '/404',
    name: "Global404",
    component: () => import('@/views/404.vue'),
    hidden: true
  },

  {
    path: '/',
    name: "GlobalDataBoard",
    redirect: '/modeling'
  },
  {
    path: '/modeling',
    name: "Modeling",
    component: Layout,
    redirect: '/modeling/low_3d',
    meta: { title: 'menu.modeling', icon: 'iconfont icon-chart', model: 'modeling' },
    children: [{
      path: 'low_3d',
      name: 'ModelingLow3d',
      component: () => import('@/views/dashboard/dataBoard.vue'),
      hidden: true,
      meta: { title: 'menu.low_3d', model: 'modeling' }
    },
    {
      path: 'index',
      name: 'ModelingDoard',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.overview', model: 'modeling' }
    },
    {
      path: 'list',
      name: 'ModelingList',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.list_search', model: 'modeling' }
    },
    {
      path: 'push',
      name: 'ModelingPash',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.push_data', model: 'modeling' }
    }]
  },
  {
    path: '/data_board',
    name: "DataBoard",
    component: () => import('@/views/dashboard/layout.vue'),
    redirect: '/data_board/index',
    meta: { title: 'menu.data_board', icon: 'iconfont icon-chart', model: 'data_board' },
    children: [{
      path: 'index',
      name: 'DataDoardIndex',
      component: () => import('@/views/dashboard/chart.vue'),
      hidden: true,
      meta: { title: 'menu.data_board', model: 'data_board' }
    }]
  },
  // 广播
  {
    path: '/broadcast',
    name: "Broadcast",
    component: Layout,
    redirect: '/broadcast/index',
    meta: { title: 'menu.broadcast', icon: 'iconfont icon-chart', model: 'broadcast' },
    children: [{
      path: 'index',
      name: 'BroadcastOverview',
      component: () => import('@/views/broadcast/chart.vue'),
      meta: { title: 'menu.overview', model: 'broadcast' }
    },
    {
      path: 'push',
      name: 'BroadcastPush',
      component: () => import('@/views/broadcast/push.vue'),
      meta: { title: 'menu.push_broadcast', model: 'broadcast' }
    },
    {
      path: 'list',
      name: 'BroadcastList',
      component: () => import('@/views/broadcast/list.vue'),
      meta: { title: 'menu.broadcast_list', model: 'broadcast' }
    },
    {
      path: 'detail',
      name: 'BroadcastDetail',
      component: () => import('@/views/broadcast/detail.vue'),
      meta: { model: 'broadcast' },
      hidden: true
    },
    {
      path: 'server_setting',
      name: 'BroadcastServerSetting',
      component: () => import('@/views/broadcast/serverSetting.vue'),
      meta: { title: 'menu.server_settings', model: 'broadcast' }
    },
    {
      path: 'call_manage',
      name: 'BroadcastCallManage',
      component: () => import('@/views/broadcast/callManage.vue'),
      meta: { title: 'menu.call_manage', model: 'broadcast' }
    },
    {
      path: 'audio_task_add',
      name: 'BroadcastTaskAdd',
      component: () => import('@/views/broadcast/taskAdd.vue'),
      meta: { title: 'menu.task_broadcast_add', model: 'broadcast' }
    },
    // {
    //   path: 'audio_manage',
    //   name: 'BroadcastAudioManage',
    //   component: () => import('@/views/broadcast/audioManage.vue'),
    //   meta: { title: 'menu.audio_manage', model: 'broadcast' }
    // },
    {
      path: 'task_broadcast',
      name: 'TaskBroadcastManage',
      component: () => import('@/views/broadcast/taskManage.vue'),
      meta: { title: 'menu.task_broadcast', model: 'broadcast' }
    },
    {
      path: 'file_manage',
      name: 'BroadcastFileManage',
      component: () => import('@/views/broadcast/fileManage.vue'),
      meta: { title: 'menu.file_manage', model: 'broadcast' }
    },
    {
      path: 'log',
      name: 'BroadcastLogManage',
      component: () => import('@/views/broadcast/logManage.vue'),
      meta: { title: 'menu.log_manage', model: 'broadcast' }
    }]
  },
  {
    path: '/monitor',
    name: "Monitor",
    component: Layout,
    redirect: '/monitor/chart',
    meta: { title: 'menu.monitor', icon: 'iconfont icon-shexiangtou', model: 'monitor' },
    children: [{
      path: 'chart',
      name: 'MonitorChart',
      component: () => import('@/views/monitor/chart.vue'),
      meta: { title: 'menu.monitor_chart', model: 'monitor' }
    },
    {
      path: 'grouping',
      name: 'MonitorGrouping',
      component: () => import('@/views/monitor/grouping.vue'),
      meta: { title: 'menu.monitor_grouping', model: 'monitor' }
    },
    {
      path: 'add',
      name: 'MonitorAdd',
      component: () => import('@/views/monitor/add.vue'),
      meta: { title: 'menu.monitor_add', model: 'monitor' }
    },
    {
      path: 'list',
      name: 'MonitorList',
      component: () => import('@/views/monitor/list.vue'),
      meta: { title: 'menu.monitor_list', model: 'monitor' }
    },
    {
      path: 'reallytime',
      name: 'MonitorReallytime',
      component: () => import('@/views/monitor/reallytime.vue'),
      meta: { title: 'menu.monitor_reallytime', model: 'monitor' }
    },
    {
      path: 'history',
      name: 'MonitorHistory',
      component: () => import('@/views/monitor/replay.vue'),
      meta: { title: 'menu.monitor_history', model: 'monitor' }
    },
    {
      path: 'setting',
      name: 'MonitorSetting',
      component: () => import('@/views/monitor/setting.vue'),
      meta: { title: 'menu.server_settings', model: 'monitor' }
    },
    {
      path: 'log',
      name: 'MonitorLog',
      component: () => import('@/views/monitor/monitorLog.vue'),
      meta: { title: 'menu.monitor_log', model: 'monitor' }
    }]
  },
  {
    path: '/wifi_devices',
    name: "WifiDevices",
    component: Layout,
    redirect: '/wifi_devices/index',
    meta: { title: 'menu.wifi_devices', icon: 'iconfont icon-chart', model: 'wifi_devices' },
    children: [{
      path: 'index',
      name: 'WifiDevicesIndex',
      component: () => import('@/views/wifi/chart.vue'),
      meta: { title: 'menu.overview', model: 'wifi_devices' }
    },
    {
      path: 'list',
      name: 'WifiDevicesList',
      component: () => import('@/views/wifi/list.vue'),
      meta: { title: 'menu.list_search', model: 'wifi_devices' }
    },
    {
      path: 'push',
      name: 'WifiDevicesPush',
      component: () => import('@/views/wifi/push.vue'),
      meta: { title: 'menu.push_data', model: 'wifi_devices' }
    }]
  },
  {
    path: '/vehicle',
    name: "Vehicle",
    component: Layout,
    redirect: '/vehicle/index',
    meta: { title: 'menu.vehicle', icon: 'iconfont icon-chart', model: 'vehicle' },
    children: [{
      path: 'index',
      name: 'VehicleIndex',
      component: () => import('@/views/vehicle/chart.vue'),
      meta: { title: 'menu.overview', model: 'vehicle' }
    },
    {
      path: 'list',
      name: 'VehicleList',
      component: () => import('@/views/vehicle/list.vue'),
      meta: { title: 'menu.list_search', model: 'vehicle' }
    },
    {
      path: 'push',
      name: 'VehiclePuth',
      component: () => import('@/views/vehicle/push.vue'),
      meta: { title: 'menu.push_data', model: 'vehicle' }
    }]
  },
  {
    path: '/light_devices',
    name: "LightDevices",
    component: Layout,
    redirect: '/light_devices/index',
    meta: { title: 'menu.light_devices', icon: 'iconfont icon-chart', model: 'light_devices' },
    children: [{
      path: 'index',
      name: 'LightDevicesIndex',
      component: () => import('@/views/light/chart.vue'),
      meta: { title: 'menu.overview', model: 'light_devices' }
    },
    {
      path: 'push',
      name: 'LightDevicesPush',
      component: () => import('@/views/light/push.vue'),
      meta: { title: 'menu.light_push', model: 'light_devices' }
    },
    {
      path: 'list',
      name: 'LightDevicesList',
      component: () => import('@/views/light/list.vue'),
      meta: { title: 'menu.light_list', model: 'light_devices' }
    },
    {
      path: 'setting',
      name: 'LightServerSettings',
      component: () => import('@/views/light/setting.vue'),
      meta: { title: 'menu.server_settings', model: 'light_devices' }
    },
    {
      path: 'region_manage',
      name: 'LightRegionManage',
      component: () => import('@/views/light/region.vue'),
      meta: { title: 'menu.region_manage', model: 'light_devices' }
    },
    {
      path: 'log',
      name: 'LightLogManage',
      component: () => import('@/views/light/log.vue'),
      meta: { title: 'menu.log_manage', model: 'light_devices' }
    }]
  },
  {
    path: '/security',
    name: "Security",
    component: Layout,
    redirect: '/security/index',
    meta: { title: 'menu.security', icon: 'iconfont icon-chart', model: 'security' },
    children: [{
      path: 'index',
      name: 'SecurityIndex',
      component: () => import('@/views/security/chart.vue'),
      meta: { title: 'menu.overview', model: 'security' }
    },
      {
        path: 'settings',
        name: 'SecuritySetting',
        component: () => import('@/views/security/setting.vue'),
        meta: { title: 'menu.server_settings', model: 'security' }
      },
    {
      path: 'list',
      name: 'SecurityList',
      component: () => import('@/views/security/list.vue'),
      meta: { title: 'menu.list_search', model: 'security' }
    },
    {
      path: 'face_add',
      name: 'SecurityFaceAdd',
      component: () => import('@/views/security/facePush.vue'),
      meta: { title: 'menu.security_face_add', model: 'security' }
    },
    {
      path: 'faces',
      name: 'SecurityFaces',
      component: () => import('@/views/security/faces.vue'),
      meta: { title: 'menu.security_faces', model: 'security' }
    },
    {
      path: 'face_signs',
      name: 'SecurityFacesSigns',
      component: () => import('@/views/security/faceSigns.vue'),
      meta: { title: 'menu.security_face_signs', model: 'security' }
    },
    {
      path: 'face_control',
      name: 'SecurityFaceControl',
      component: () => import('@/views/security/faceControl.vue'),
      meta: { title: 'menu.security_face_control', model: 'security' }
    }]
  },
  {
    path: '/uva',
    name: "UVA",
    component: Layout,
    redirect: '/uva/index',
    meta: { title: 'menu.uva', icon: 'iconfont icon-chart', model: 'uva' },
    children: [{
      path: 'index',
      name: 'UVAIndex',
      component: () => import('@/views/uva/chart.vue'),
      meta: { title: 'menu.overview', model: 'uva' }
    },
    {
      path: 'screen_view',
      name: 'UVAScreenView',
      component: () => import('@/views/uva/screen.vue'),
      meta: { title: 'menu.screen_view', model: 'uva' }
    },
    {
      path: 'push',
      name: 'UVADevicesPush',
      component: () => import('@/views/uva/push.vue'),
      meta: { title: 'menu.devices_push', model: 'uva' }
    },
    {
      path: 'devices_list',
      name: 'UVADevicesList',
      component: () => import('@/views/uva/list.vue'),
      meta: { title: 'menu.devices_list', model: 'uva' }
    },
    {
      path: 'server_settings',
      name: 'UVAServerSettings',
      component: () => import('@/views/uva/setting.vue'),
      meta: { title: 'menu.server_settings', model: 'uva' }
    },
    {
      path: 'log',
      name: 'UVALogManage',
      component: () => import('@/views/uva/log.vue'),
      meta: { title: 'menu.log_manage', model: 'uva' }
    }]
  },
  {
    path: '/fogrise_devices',
    name: "FogriseDevices",
    component: Layout,
    redirect: '/fogrise_devices/index',
    meta: { title: 'menu.fogrise_devices', icon: 'iconfont icon-chart', model: 'fogrise_devices' },
    children: [{
      path: 'index',
      name: 'FogriseDevicesIndex',
      component: () => import('@/views/fogrise/chart.vue'),
      meta: { title: 'menu.overview', model: 'fogrise_devices' }
    },
    {
      path: 'push',
      name: 'FogriseDevicesPush',
      component: () => import('@/views/fogrise/push.vue'),
      meta: { title: 'menu.devices_push', model: 'fogrise_devices' }
    },
    {
      path: 'list',
      name: 'FogriseDevicesList',
      component: () => import('@/views/fogrise/list.vue'),
      meta: { title: 'menu.devices_list', model: 'fogrise_devices' }
    },
    {
      path: 'server_settings',
      name: 'FogriseDevicesServerSettings',
      component: () => import('@/views/fogrise/setting.vue'),
      meta: { title: 'menu.server_settings', model: 'fogrise_devices' }
    },
    {
      path: 'region_manage',
      name: 'FogriseDevicesRegionManage',
      component: () => import('@/views/fogrise/region.vue'),
      meta: { title: 'menu.region_manage', model: 'fogrise_devices' }
    },
    {
      path: 'log',
      name: 'FogriseDevicesLogManage',
      component: () => import('@/views/fogrise/log.vue'),
      meta: { title: 'menu.log_manage', model: 'fogrise_devices' }
    }]
  },
  {
    path: '/devices_manage',
    name: "DevicesManage",
    component: Layout,
    redirect: '/devices_manage/index',
    meta: { title: 'menu.devices_manage', icon: 'iconfont icon-chart', model: 'devices_manage' },
    children: [{
      path: 'index',
      name: 'DevicesManageIndex',
      component: () => import('@/views/device/chart.vue'),
      meta: { title: 'menu.overview', model: 'devices_manage' }
    },
    {
      path: 'push',
      name: 'DevicesManagePush',
      component: () => import('@/views/device/push.vue'),
      meta: { title: 'menu.devices_push', model: 'devices_manage' }
    },
    {
      path: 'list',
      name: 'DevicesManageList',
      component: () => import('@/views/device/list.vue'),
      meta: { title: 'menu.devices_list', model: 'devices_manage' }
    },
    {
      path: 'brands',
      name: 'DevicesManageBrands',
      component: () => import('@/views/project/brands.vue'),
      meta: { title: 'menu.brands_list', model: 'devices_manage' }
    },
    {
      path: 'server_settings',
      name: 'DevicesManageServerSettings',
      component: () => import('@/views/device/setting.vue'),
      meta: { title: 'menu.server_settings', model: 'devices_manage' }
    },
    {
      path: 'log',
      name: 'DevicesManageLogManage',
      component: () => import('@/views/device/log.vue'),
      meta: { title: 'menu.log_manage', model: 'devices_manage' }
    }]
  },
  {
    path: '/big_screen',
    name: "BigScreen",
    component: Layout,
    redirect: '/big_screen/index',
    meta: { title: 'menu.big_screen', icon: 'iconfont icon-chart', model: 'big_screen' },
    children: [{
      path: 'index',
      name: 'BigScreenIndex',
      component: () => import('@/views/big_screen/chart.vue'),
      meta: { title: 'menu.big_screen', model: 'big_screen' }
    },
    {
      path: 'push',
      name: 'BigScreenPush',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_push', model: 'big_screen' }
    },
    {
      path: 'list',
      name: 'BigScreenList',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_list', model: 'big_screen' }
    },
    {
      path: 'server_settings',
      name: 'BigScreenServerSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.server_settings', model: 'big_screen' }
    },
    {
      path: 'log',
      name: 'BigScreenLogManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.log_manage', model: 'big_screen' }
    }]
  },
  {
    path: '/water',
    name: "Water",
    component: Layout,
    redirect: '/water/index',
    meta: { title: 'menu.water', icon: 'iconfont icon-shuizhi', model: 'water' },
    children: [{
      path: 'index',
      name: 'WaterIndex',
      component: () => import('@/views/water/chart.vue'),
      meta: { title: 'menu.water', model: 'water' }
    },
    {
      path: 'push',
      name: 'WaterPush',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_push', model: 'water' }
    },
    {
      path: 'list',
      name: 'WaterList',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_list', model: 'water' }
    },
    {
      path: 'server_settings',
      name: 'WaterServerSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.server_settings', model: 'water' }
    },
    {
      path: 'region_manage',
      name: 'WaterRegionManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.region_manage', model: 'water' }
    },
    {
      path: 'log',
      name: 'WaterLogManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.log_manage', model: 'water' }
    }]
  },
  {
    path: '/danger',
    name: "Danger",
    component: Layout,
    redirect: '/danger/index',
    meta: { title: 'menu.danger', icon: 'iconfont icon-weixian', model: 'danger' },
    children: [{
      path: 'index',
      name: 'DangerIndex',
      component: () => import('@/views/danger/chart.vue'),
      meta: { title: 'menu.overview', model: 'danger' }
    },
    {
      path: 'push',
      name: 'DangerPush',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_push', model: 'danger' }
    },
    {
      path: 'list',
      name: 'DangerList',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_list', model: 'danger' }
    },
    {
      path: 'server_settings',
      name: 'DangerServerSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.server_settings', model: 'danger' }
    },
    {
      path: 'log',
      name: 'DangerLogManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.log_manage', model: 'danger' }
    }]
  },
  {
    path: '/parking',
    name: "Parking",
    component: Layout,
    redirect: '/parking/index',
    meta: { title: 'menu.parking', icon: 'iconfont icon-chart', model: 'parking' },
    children: [{
      path: 'index',
      name: 'ParkingIndex',
      component: () => import('@/views/parking/chart.vue'),
      meta: { title: 'menu.overview', model: 'parking' }
    },
    {
      path: 'car_lane',
      name: 'ParkingCarIn',
      component: () => import('@/views/parking/lane.vue'),
      meta: { title: 'menu.car_lane', model: 'parking' }
    },
    {
      path: 'car_out',
      name: 'ParkingCarOut',
      component: () => import('@/views/parking/carIn.vue'),
      meta: { title: 'menu.car_out', model: 'parking' }
    },
    {
      path: 'car_wait',
      name: 'ParkingCarEmptyQuery',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.car_wait', model: 'parking' }
    },
    {
      path: 'car_query',
      name: 'ParkingCarQuery',
      component: () => import('@/views/parking/order.vue'),
      meta: { title: 'menu.car_query', model: 'parking' }
    },
  /*
    {
      path: 'transaction_flow',
      name: 'ParkingTransactionFlow',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.transaction_flow', model: 'parking' }
    },
 */
    {
      path: 'car_log',
      name: 'ParkingChargingStandard',
      component: () => import('@/views/parking/errorLog.vue'),
      meta: { title: 'menu.car_log', model: 'parking' }
    }]
  },
  {
    path: '/gis_map',
    name: "GisMap",
    component: Layout,
    redirect: '/gis_map/index',
    meta: { title: 'menu.gis_map', icon: 'iconfont icon-GIS', model: 'gis_map' },
    children: [{
      path: 'index',
      name: 'GisMapIndex',
      component: () => import('@/views/gis_map/chart.vue'),
      meta: { title: 'menu.overview', model: 'gis_map' }
    },
    {
      path: 'push',
      name: 'GisMapPush',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_push', model: 'gis_map' }
    },
    {
      path: 'list',
      name: 'GisMapList',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_list', model: 'gis_map' }
    },
    {
      path: 'server_settings',
      name: 'GisMapServerSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.server_settings', model: 'gis_map' }
    },
    {
      path: 'log',
      name: 'GisMapLogManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.log_manage', model: 'gis_map' }
    }]
  },
  {
    path: '/pass_manage',
    name: "PassManage",
    component: Layout,
    redirect: '/pass_manage/index',
    meta: { title: 'menu.pass_manage', icon: 'iconfont icon-tonghang', model: 'pass_manage' },
    children: [{
      path: 'index',
      name: 'PassIndex',
      component: () => import('@/views/pass/chart.vue'),
      meta: { title: 'menu.overview', model: 'gis_map' }
    },
    {
      path: 'mobile_user',
      name: 'PassManageMobileUserManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.mobile_user_manage', model: 'pass_manage' }
    },
    {
      path: 'backend_user_manage',
      name: 'PassManageBackendUserManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.pass_query', model: 'pass_manage' }
    },
    {
      path: 'log',
      name: 'PassManageLogManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.look_log', model: 'pass_manage' }
    }]
  },
  {
    path: '/data_perception',
    name: "DataPerception",
    component: Layout,
    redirect: '/data_perception/index',
    meta: { title: 'menu.data_board', icon: 'iconfont icon-chart', model: 'data_perception' },
    children: [{
      path: 'index',
      name: 'DataPerceptionIndex',
      component: () => import('@/views/common/deving.vue'),
      hidden: true,
      meta: { title: 'menu.data_perception', model: 'data_perception' }
    }]
  },
  {
    path: '/alarm_manage',
    name: "AlarmManage",
    component: Layout,
    redirect: '/alarm_manage/index',
    meta: { title: 'menu.alarm_manage', icon: 'iconfont icon-chart', model: 'alarm_manage' },
    children: [{
      path: 'index',
      name: 'AlarmManageIndex',
      component: () => import('@/views/alarm/chart.vue'),
      meta: { title: 'menu.alarm_statistics', model: 'alarm_manage' }
    },
    {
      path: 'push',
      name: 'AlarmManagePush',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_push', model: 'alarm_manage' }
    },
    {
      path: 'list',
      name: 'AlarmManageList',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.devices_list', model: 'alarm_manage' }
    },
    {
      path: 'server_settings',
      name: 'AlarmManageServerSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.server_settings', model: 'alarm_manage' }
    },
    {
      path: 'region_manage',
      name: 'AlarmManageRegionManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.region_manage', model: 'alarm_manage' }
    },
    {
      path: 'log',
      name: 'AlarmManageLogManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.log_manage', model: 'alarm_manage' }
    }]
  },
  {
    path: '/system_setting',
    name: "SystemSetting",
    component: Layout,
    redirect: '/system_setting/website_settings',
    meta: { title: 'menu.system_setting', icon: 'iconfont icon-chart', model: 'system_setting' },
    children: [{
      path: 'website_settings',
      name: 'SystemSettingWebsiteSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.website_settings', model: 'system_setting' }
    },
    {
      path: 'security_setting',
      name: 'SystemSettingSecuritySetting',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.security_setting', model: 'system_setting' }
    },
    {
      path: 'web_master',
      name: 'SystemSettingWebMaster',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.web_master', model: 'system_setting' }
    },
    {
      path: 'sms_platform',
      name: 'SystemSettingSmsPlatform',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.sms_platform', model: 'system_setting' }
    },
    {
      path: 'payment_settings',
      name: 'SystemSettingPaymentSettings',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.payment_settings', model: 'system_setting' }
    },
    {
      path: 'system_log',
      name: 'SystemSettingSystemLog',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.system_log', model: 'system_setting' }
    }]
  },
  {
    path: '/user_manage',
    name: "UserManage",
    component: Layout,
    redirect: '/user_manage/index',
    meta: { title: 'menu.user_manage', icon: 'iconfont icon-chart', model: 'user_manage' },
    children: [{
      path: 'index',
      name: 'UserManageIndex',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.overview', model: 'user_manage' }
    },
    {
      path: 'list',
      name: 'UserManageList',
      component: () => import('@/views/tourist/customer.vue'),
      meta: { title: 'menu.list_search', model: 'user_manage' }
    },
    {
      path: 'push',
      name: 'UserManagePush',
      component: () => import('@/views/tourist/customerPush.vue'),
      meta: { title: 'menu.push_data', model: 'user_manage' }
    },
    {
      path: 'banner_manage',
      name: "BannerManage",
      component: () => import('@/views/tourist/banner.vue'),
      meta: { title: 'menu.banner_manage', model: 'user_manage' }
    },
    {
      path: 'active_manage',
      name: "ActivrManage",
      component: () => import('@/views/tourist/activity.vue'),
      meta: { title: 'menu.active_manage', model: 'user_manage' }
    },
    {
      path: 'strategy_manage',
      name: "StrategyManage",
      component: () => import('@/views/tourist/strategy.vue'),
      meta: { title: 'menu.strategy_manage', model: 'user_manage' }
    }]
  },
  {
    path: '/permission_manage',
    name: "PermissionManage",
    component: Layout,
    redirect: '/permission_manage/role_list',
    meta: { title: 'menu.permission_manage', icon: 'iconfont icon-chart', model: 'permission_manage' },
    children: [{
      path: 'role_list',
      name: 'PermissionManageRoleList',
      component: () => import('@/views/user/role.vue'),
      meta: { title: 'menu.role_list', model: 'permission_manage' }
    },{
      path: 'role_push',
      name: 'PermissionManageRolePush',
      component: () => import('@/views/user/rolePush.vue'),
      meta: { title: 'menu.role_push', model: 'permission_manage' }
    },
    {
      path: 'admin_list',
      name: 'PermissionManageAdminPush',
      component: () => import('@/views/user/user.vue'),
      meta: { title: 'menu.admin_list', model: 'permission_manage' }
    },
    {
      path: 'admin_push',
      name: 'PermissionManageAdminPush',
      component: () => import('@/views/user/userPush.vue'),
      meta: { title: 'menu.admin_push', model: 'permission_manage' }
    },
    {
      path: 'permission_list',
      name: 'PermissionManagePermissionList',
      component: () => import('@/views/user/permission.vue'),
      meta: { title: 'menu.permission_list', model: 'permission_manage' }
    },
    {
      path: 'permission_push',
      name: 'PermissionManagePermissionPush',
      component: () => import('@/views/user/permissionPush.vue'),
      meta: { title: 'menu.permission_push', model: 'permission_manage' }
    }]
  },
  {
    path: '/log_manage',
    name: "LogManage",
    component: Layout,
    redirect: '/log_manage/look_frontend_log',
    meta: { title: 'menu.log_manage', icon: 'iconfont icon-chart', model: 'log_manage' },
    children: [{
      path: 'look_frontend_log',
      name: 'LogManageLookFrontendLog',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.look_frontend_log', model: 'log_manage' }
    },
    {
      path: 'look_backend_log',
      name: 'LogManagelook_backend_log',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.look_backend_log', model: 'log_manage' }
    }]
  },
  {
    path: '/maintenance',
    name: "Maintenance",
    component: Layout,
    redirect: '/maintenance/index',
    meta: { title: 'menu.maintenance', icon: 'iconfont icon-chart', model: 'maintenance' },
    children: [{
      path: 'index',
      name: 'MaintenanceIndex',
      component: () => import('@/views/maintenance/chart.vue'),
      meta: { title: 'menu.overview', model: 'maintenance' }
    },
    {
      path: 'person_manage',
      name: 'MaintenancePersonManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.person_manage', model: 'maintenance' }
    },
    {
      path: 'event_query',
      name: 'MaintenanceEventQuery',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.event_query', model: 'maintenance' }
    }]
  },
  {
    path: '/official_account',
    name: "OfficialAccount",
    component: Layout,
    redirect: '/official_account/index',
    meta: { title: 'menu.official_account', icon: 'iconfont icon-chart', model: 'official_account' },
    children: [{
      path: 'index',
      name: 'OfficialAccountIndex',
      component: () => import('@/views/official_account/chart.vue'),
      meta: { title: 'menu.overview', model: 'official_account' }
    },
    {
      path: 'menu_manage',
      name: 'OfficialAccountMenuManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.menu_manage', model: 'official_account' }
    },
    {
      path: 'auto_reply',
      name: 'OfficialAccountAutoReply',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.auto_reply', model: 'official_account' }
    },
    {
      path: 'material_manage',
      name: 'OfficialAccountMaterialManage',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.material_manage', model: 'official_account' }
    },
    {
      path: 'keyword_reply',
      name: 'OfficialAccountKeywordReply',
      component: () => import('@/views/common/deving.vue'),
      meta: { title: 'menu.keyword_reply', model: 'official_account' }
    }]
  },

  // {
  //   path: '/dashboard',
  //   component: Layout,
  //   redirect: '/dashboard/model-map',
  //   meta: { title: 'menu.dashboard', icon: 'iconfont icon-chart' },
  //   children: [{
  //     path: 'home',
  //     name: 'Home',
  //     component: () => import('@/views/dashboard/index.vue'),
  //     meta: { title: 'menu.home' }
  //   },{
  //     path: 'data-board',
  //     name: 'DataDoard',
  //     component: () => import('@/views/dashboard/dataBoard.vue'),
  //     meta: { title: 'menu.data_board' }
  //   },{
  //     path: 'model-map',
  //     name: 'ModelMap',
  //     component: () => import('@/views/modelMap/index.vue'),
  //     meta: { title: 'menu.model_map' }
  //   },{
  //     path: 'danger',
  //     name: 'Danger',
  //     component: () => import('@/views/dashboard/danger.vue'),
  //     meta: { title: 'menu.danger' }
  //   }]
  // },
  // {
  //   path: '/project',
  //   component: Layout,
  //   redirect: '/project/brands',
  //   name: 'Project',
  //   meta: { title: 'menu.project', icon: 'iconfont icon-abacus' },
  //   children: [
  //     {
  //       path: 'brands',
  //       name: 'Brands',
  //       component: () => import('@/views/project/brands.vue'),
  //       meta: { title: 'menu.brands' },
  //     },
  //     {
  //       path: 'product',
  //       name: 'Product',
  //       component: () => import('@/views/project/product.vue'),
  //       meta: { title: 'menu.product' },
  //     },
  //     {
  //       path: 'pleasureBoats',
  //       name: 'PleasureBoats',
  //       component: () => import('@/views/project/pleasureBoats.vue'),
  //       meta: { title: 'menu.pleasureBoats' },
  //     },
  //     {
  //       path: 'smallTrains',
  //       name: 'SmallTrains',
  //       component: () => import('@/views/project/smallTrains.vue'),
  //       meta: { title: 'menu.smallTrains' },
  //     },
  //     {
  //       path: 'tourCars',
  //       name: 'TourCars',
  //       component: () => import('@/views/project/tourCars.vue'),
  //       meta: { title: 'menu.tourCars' },
  //     },
  //     {
  //       path: 'order',
  //       name: 'Order',
  //       component: () => import('@/views/project/order.vue'),
  //       meta: { title: 'menu.order' },
  //     },
  //     {
  //       path: 'modeling',
  //       name: 'Modeling',
  //       component: () => import('@/views/project/modeling.vue'),
  //       meta: { title: 'menu.modeling' },
  //     }
  //   ]
  // },
  // {
  //   path: '/device',
  //   component: Layout,
  //   redirect: '/device/fogriseDevices',
  //   name: 'Device',
  //   meta: { title: 'menu.device', icon: 'iconfont icon-weighing-scale2' },
  //   children: [
  //     {
  //       path: 'fogrise-devices',
  //       name: 'FogriseDevices',
  //       component: () => import('@/views/device/fogriseDevices.vue'),
  //       meta: { title: 'menu.fogriseDevices' },
  //     },
  //     {
  //       path: 'light-devices',
  //       name: 'LightDevices',
  //       component: () => import('@/views/device/lightDevices.vue'),
  //       meta: { title: 'menu.lightDevices' },
  //     },
  //     {
  //       path: 'wifi-devices',
  //       name: 'WifiDevices',
  //       component: () => import('@/views/device/wifiDevices.vue'),
  //       meta: { title: 'menu.wifiDevices' },
  //     },
  //     {
  //       path: 'devices-docs',
  //       name: 'DevicesDocs',
  //       component: () => import('@/views/device/devicesDocs.vue'),
  //       meta: { title: 'menu.devicesDocs' },
  //     },
  //     {
  //       path: 'devices-models',
  //       name: 'DevicesModels',
  //       component: () => import('@/views/device/devicesModels.vue'),
  //       meta: { title: 'menu.devicesModels' },
  //     },
  //     {
  //       path: 'broadcast',
  //       name: 'Droadcast',
  //       component: () => import('@/views/device/broadcast.vue'),
  //       meta: { title: 'menu.broadcast' },
  //     },
  //     {
  //       path: 'uva',
  //       name: 'UVA',
  //       component: () => import('@/views/device/uva.vue'),
  //       meta: { title: 'menu.uva' },
  //     },
  //     {
  //       path: 'water',
  //       name: 'Water',
  //       component: () => import('@/views/device/water.vue'),
  //       meta: { title: 'menu.water' },
  //     }
  //   ]
  // },
  // {
  //   path: '/tourist',
  //   component: Layout,
  //   redirect: '/tourist/customer',
  //   name: 'Tourist',
  //   meta: { title: 'menu.touristManage', icon: 'iconfont icon-people' },
  //   children: [
  //     {
  //       path: 'customer',
  //       name: 'Customer',
  //       component: () => import('@/views/tourist/customer.vue'),
  //       meta: { title: 'menu.tourist' },
  //     },
  //     {
  //       path: 'activity',
  //       name: 'Activity',
  //       component: () => import('@/views/tourist/activity.vue'),
  //       meta: { title: 'menu.activity' },
  //     },
  //     {
  //       path: 'strategy',
  //       name: 'Strategy',
  //       component: () => import('@/views/tourist/strategy.vue'),
  //       meta: { title: 'menu.strategy' },
  //     },
  //     {
  //       path: 'feedback',
  //       name: 'Feedback',
  //       component: () => import('@/views/tourist/feedback.vue'),
  //       meta: { title: 'menu.feedback' },
  //     },
  //     {
  //       path: 'banner',
  //       name: 'Banner',
  //       component: () => import('@/views/tourist/banner.vue'),
  //       meta: { title: 'menu.banner' },
  //     }
  //   ]
  // },
  // {
  //   path: '/user',
  //   component: Layout,
  //   redirect: '/user/user',
  //   name: 'User',
  //   meta: { title: 'menu.userManage', icon: 'iconfont icon-people' },
  //   children: [
  //     {
  //       path: 'user',
  //       name: 'User',
  //       component: () => import('@/views/user/user.vue'),
  //       meta: { title: 'menu.user' },
  //     },
  //     {
  //       path: 'role',
  //       name: 'Role',
  //       component: () => import('@/views/user/role.vue'),
  //       meta: { title: 'menu.role' },
  //     },
  //     {
  //       path: 'permission',
  //       name: 'Permission',
  //       component: () => import('@/views/user/permission.vue'),
  //       meta: { title: 'menu.permission' },
  //     }
  //   ]
  // },


  { path: '*', redirect: '/404', hidden: true }
]

const createRouter = (): any => new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

const router = createRouter();

export function resetRouter() {
  (router as any).matcher = createRouter().matcher // reset router
}

export default router
